package com.bear.sgg.springboot_05_log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Springboot05LogApplication {

    public static void main(String[] args) {
        SpringApplication.run(Springboot05LogApplication.class, args);

        Logger logger = LoggerFactory.getLogger(Springboot05LogApplication.class);


        /*
         * self4J日志分为五个等级：trace<debug<info<warn<error
         * 可以通过配置文件配置日志的输出级别，只有大于等于该级别的日志才会显示
         * */
        logger.trace("这是trace日志");
        logger.debug("这是debug日志");

        /*spring默认的日志输出级别为info*/
        logger.info("这是info日志");
        logger.warn("这是warn日志");
        logger.error("这是error日志");
    }

}
